package com.book.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.book.common.converter.TimeConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wuwenze.poi.annotation.ExcelField;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


/**
 * @Author: 黄海峰
 * @Description:  20155933
 */


@Data
@Accessors(chain = true)
@TableName("t_login_log")
public class LoginLog {
    @TableId(value = "ID", type = IdType.AUTO)
    @ExcelField("编号")
    private Integer id;

    @TableField("USERNAME")
    @ExcelField("用户名")
    private String username;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField("LOGIN_TIME")
    @ExcelField(value = "登录时间", writeConverter = TimeConverter.class)
    private Date logintime;

    @TableField("LOCATION")
    @ExcelField(value = "登陆地点")
    private String location;

    @TableField("IP")
    @ExcelField("IP地址")
    private String ip;

    @TableField("SYSTEM")
    @ExcelField("操作系统")
    private String system;

    @TableField("BROWSER")
    @ExcelField("浏览器")
    private String browser;
}
